<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddCallbackToPay extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('pay_stream', function (Blueprint $table) {
            $table->string('callbackUrl', 128)->default('')->comment('己方服务-支付成功的回调地址');
        });

        Schema::table('refund_stream', function (Blueprint $table) {
            $table->string('callbackUrl', 128)->default('')->comment('己方服务-退款成功的回调地址');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('pay_stream', function (Blueprint $table) {
            $table->dropColumn('callbackUrl');
        });

        Schema::table('refund_stream', function (Blueprint $table) {
            $table->dropColumn('callbackUrl');
        });
    }
}
